#coding=utf-8
"""
python2.7
selenium 2.5.3
PhantomJS 2.1.1
"""
from selenium import webdriver
import os, time

driver = webdriver.PhantomJS(executable_path='D:\workon\python27\work\phantomjs.exe')

driver.get("http://baidu.com")
time.sleep(3)
#driver.maximize_window()
a = driver.title
print a

time.sleep(1)
driver.find_element_by_id('kw').send_keys('selenium')
driver.find_element_by_id('su').click()

print(driver.get_cookies())
time.sleep(2)
driver.quit()
